<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的动态</title>
    <style>
        li {
            list-style: none
        }

        .layui-timeline-axis {
            position: absolute;
            left: -5px;
            top: 0;
            z-index: 10;
            width: 20px;
            height: 20px;
            line-height: 20px;
            background-color: #fff;
            color: #5FB878;
            border-radius: 50%;
            text-align: center;
            cursor: pointer
        }

        .layui-timeline-axis:hover {
            color: #FF5722
        }

        .layui-timeline-content {
            padding-left: 25px
        }

        .layui-text {
            line-height: 22px;
            font-size: 14px;
            color: #666
        }

        .layui-text h3 {
            font-size: 18px
        }

        .layui-timeline-title {
            position: relative;
            margin-bottom: 10px
        }

        .layui-timeline-item:before,
        hr {
            background-color: #e6e6e6
        }

        .layui-timeline-item {
            position: relative;
            padding-bottom: 20px
        }

        .layui-timeline-item:before {
            content: '';
            position: absolute;
            left: 5px;
            top: 0;
            z-index: 0;
            width: 1px;
            height: 100%
        }

        .layui-timeline-item:last-child:before {
            display: none
        }

        .layui-timeline-item:first-child:before {
            display: block
        }
    </style>
    <style>
        .yui_timeline {
            margin-left: -15px
        }

        .layui-timeline-axis img {
            margin-top: 3px
        }
        .yui_none{
            overflow-x: hidden;
        }
    </style>
</head>

<body>
    <div class="yui_timeline">
        <ul class="layui-timeline yui_none" id="timeline">
            <script id="timeline_tpl" type="text/x-dot-template">
            {{ for(var i=0; i < it.length; i++) { }}
            <li class="layui-timeline-item">
                <i class="layui-timeline-axis"><img src='../../image/time_icon.png'/></i>
                <div class="layui-timeline-content layui-text">
                    <h3 class="layui-timeline-title">{{= timetostr(it[i].created_at) }}</h3>
                    <p>
                        {{= decodeHTMLEntities(it[i].content) }}
                    </p>
                </div>
            </li>
            {{ } }}
            </script>
        </ul>
    </div>
</body>

</html>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/doT.min.js"></script>
<script type="text/javascript">
    apiready = function() {
        getTimeLineData();
    }

    function getTimeLineData() {
        runAjax('http://118.24.84.86/index.php/admin/app/mine',null,function(ret){
          if (ret) {
            dotTpl('timeline_tpl','timeline',ret['data']);
          } else {
              showToast('数据',1000);
          }
    		});
    }
</script>
